import { UPDATE_DATA } from '@/action/userAction';

const userReducer = (state = {
    loading: false,
    list: [],
    total: 0,
    current: 1,
}, action) => {
    switch (action.type) {
    case UPDATE_DATA:
        const { payload } = action;
        return {
            ...state,
            ...payload,
        }
    default:
        return state;
    }
}

export default userReducer;
